// File: src/core/auth/AuthManager.h
#pragma once
#include <string>
#include <unordered_map>
#include "crypto/SHA256.h"

class AuthManager {
public:
    bool userExists(const std::string& username);
    bool registerUser(const std::string& username, const std::string& password);
    bool authenticate(const std::string& username, const std::string& password);
    void saveToFile();
    void loadFromFile();

private:
    std::unordered_map<std::string, std::string> userDB; // username -> hashed password
    
    std::string hashPassword(const std::string& password) {
        return sha256(password + "TM_SALT_2023");
    }
};
